puts "INFO: Running script [info script] @ [exec date]\n"


set buf [dbGet head.libCells.name "BUFM12HM"]

# get clk port
set clk_net [get_object_name [get_net -of [get_port -filter "is_clock_root==true"]]]

set fo [open clkNet.txt w+]
foreach net $clk_net {
		puts $fo "$net"
}
close $fo

# add clock port buffer
attachIOBuffer -port -in $buf -out $buf -status softfixed -suffix _IO_BUF -selNetFile clkNet.txt

# add signal port buffer 
attachIOBuffer -port -in $buf -out $buf -status softfixed -suffix _IO_BUF -excNetFile clkNet.txt


# legalize
foreach inst [dbGet top.insts.name *IO_BUF] {
		specifyInstPad $inst -left 2 -right 2 -top 1
}
refinePlace -inst *_IO_BUF


puts "INFO: Completed script [info script]\n"

